
(function(ns){

var JsIcon = ns.JsIcon = Hilo.Class.create({
    Extends: Hilo.Sprite,
    constructor: function(properties){
		//console.log(properties)
        JsIcon.superclass.constructor.call(this, properties);
        
        this.addFrame(properties.atlas.getSprite('jsicon'));
        this.interval = 3;
		this.loop = false;
        this.pivotX = .5;
        this.pivotY = .5;
		// this.scaleX = .5;
		// this.scaleY = .5;
    },
	isReady:false,
	doNum:0,
	hu:null,
    getReady: function(hu,score){
		console.log(score)
		this.hu = hu
		switch(score) {
		     case 150:
				this.x = this.x + 10
				this.y = this.y - 7
		        break;
		     case 100:
				this.x = this.x + 5
				this.y = this.y - 0
		        break;
			case 50:
				this.y = this.y - 0		
			   break;
			case 0:
				this.x = this.x + 10
				this.y = this.y - 0		
			   break;
		     default:
		       //console.log("浇水")
		} 
		this.visible = true
		this.goto(0,true)
		this.play()
        //this.isReady = true
    },
    onUpdate: function(){
		if(this.currentFrame > 33){
			this.visible = false
			window.game.hu.visible = true
		}
		
    }
});

})(window.game);